<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <link href="styles/default.css"
              rel="stylesheet"
              type="text/css"
              media="all">
        <script src="js/jquery/jquery-1.4.2.min.js"
        type="text/javascript"></script>
        <script src="js/jquery/jquery.tools.min.js"
        type="text/javascript"></script>

        <script src="js/default.js"
        type="text/javascript"></script>

        <!--[if IE]>
        <script type='text/javascript'
        src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
        <![endif]-->

        <script>
            
            $(document).ready(function () {
                
                console.time('Validify Time');
                
                $("#test").vValidify({
                    regExp: "[A-Za-z ]+",
                    required: true,
                    errorMessage: "This is a message 1.",
                    elementErrorStyle: {}
                });
                
                $("#test2").vValidify({
                    regExp: "[0-9]+",
                    required: true,
                    tooltipStyle: {
                        "background-color": "#000000"
                    },
                    errorMessage: "This is a message 2."
                });

                $("#test3").vValidify({
                    regExp: "[0-9]+",
                    required: true,
                    errorMessage: "This is a message 3."
                });
                
                /*
                $.vSetTooltipStyle({
                    "background-color": "GREEN"
                });
                */
                
                console.timeEnd('Validify Time');
                
            });
            
            function check () {
                if (!$("#test").vIsValid()) {
                    $("#test").vShowError();
                } else {
                    $("#test").vHideError();
                }
                
                if (!$("#test2").vIsValid()) {
                    $("#test2").vShowError();
                } else {
                    $("#test2").vHideError();
                }

                if (!$("#test3").vIsValid()) {
                    $("#test3").vShowError();
                } else {
                    $("#test3").vHideError();
                }
            }
            
        </script>
    </head>
    <body>
        <br /><br />
        <input type="text"
               id="test"
               name="test" />
        <br /><br />
        <select id="test2"
                name="test2">
            <option value=""></option>
            <option value="0">A</option>
            <option value="1">B</option>
        </select>
        <br /><br />
        <textarea id="test3"
                  name="test3"></textarea>
        <br /><br />
        <input type="button" value="Check"
               onclick="javascript:check();"/>
    </body>
</html>

